package com.dhcc.bpm.modules.cost.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dhcc.bpm.modules.cost.entity.CostRule;
import com.dhcc.bpm.modules.cost.vo.CostRuleVO;
import org.springblade.core.mp.base.BaseService;

import javax.validation.constraints.NotEmpty;
import java.util.List;

/**
 * @ClassName ICostRuleService.class
 * @Description   收费规则表 服务类
 * @Author xiaFaYu
 * @Date 2019-12-16 14:16
 * @Version V1.0
 * @Copyright: 2020 东华软件 . All rights reserved.
 */
public interface ICostRuleService extends BaseService<CostRule> {

	/**
	 * @Description 自定义分页
	 * @Author xiafayu
	 * @Date 2020/2/24 15:11
	 * @param page
 * @param costRule
	 * @return IPage<CostRuleVO>
	 **/
	IPage<CostRuleVO> selectCostRulePage(IPage<CostRuleVO> page, CostRuleVO costRule);

	/**
	* @author: 陈泽
	* @date: 2019/12/16 16:50
	* @description: 通过产品ID获取
	* @param: [productId]
	* @return: com.dhcc.bpm.modules.cost.vo.CostRuleVO
	*/
    CostRuleVO getByProductId(Long productId);

	/**
	* @author: 陈泽
	* @date: 2019/12/16 16:52
	* @description: 通过接口ID获取
	* @param: [apitId]
	* @return: com.dhcc.bpm.modules.cost.vo.CostRuleVO
	*/
	CostRuleVO getByApiId(Long apiId);

	/**
	 * @Description 更新状态
	 * @Author xiafayu
	 * @Date 2020/2/24 15:11
	 * @param
	 * @return boolean
	 **/
	boolean updateRefreshStatus();

	/**
	 * @Description 根据apiIds获得批量收费设置列表
	 * @Date 2020/2/21 23:02
	 * @param ids
	 * @return java.util.List<com.dhcc.bpm.modules.cost.vo.CostRuleVO>
	 **/
    List<CostRuleVO> getListByIds(@NotEmpty List<Long> ids);
}
